// $ANTLR 3.2 Sep 23, 2009 14:05:07 E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g 2011-09-18 21:17:55

package lua.compiler.generated;

import org.antlr.runtime.BitSet;
import org.antlr.runtime.MismatchedSetException;
import org.antlr.runtime.NoViableAltException;
import org.antlr.runtime.Parser;
import org.antlr.runtime.ParserRuleReturnScope;
import org.antlr.runtime.RecognitionException;
import org.antlr.runtime.RecognizerSharedState;
import org.antlr.runtime.Token;
import org.antlr.runtime.TokenStream;
import org.antlr.runtime.tree.CommonTreeAdaptor;
import org.antlr.runtime.tree.TreeAdaptor;

public class LuaParser extends Parser {
	public static final String[] tokenNames = new String[] { "<invalid>",
			"<EOR>", "<DOWN>", "<UP>", "ASSIGN", "DEF", "NAME", "LPAREN",
			"RPAREN", "END", "IF", "ELSE", "RETURN", "COMMA", "CALL", "PLUS",
			"MINUS", "CONCAT", "MUL", "DIV", "MOD", "AND", "OR", "LT", "LE",
			"GT", "GE", "EQ", "NEQ", "NOT", "INT", "FLOAT", "EXP", "HEX",
			"STRING", "DO", "THEN", "BREAK", "NIL", "QUOT", "COMMENT",
			"LINE_COMMENT", "WS", "NEWLINE" };
	public static final int LT = 23;
	public static final int DEF = 5;
	public static final int MOD = 20;
	public static final int DO = 35;
	public static final int FLOAT = 31;
	public static final int NOT = 29;
	public static final int AND = 21;
	public static final int EOF = -1;
	public static final int BREAK = 37;
	public static final int LPAREN = 7;
	public static final int IF = 10;
	public static final int RPAREN = 8;
	public static final int NAME = 6;
	public static final int THEN = 36;
	public static final int EXP = 32;
	public static final int COMMA = 13;
	public static final int HEX = 33;
	public static final int RETURN = 12;
	public static final int PLUS = 15;
	public static final int EQ = 27;
	public static final int COMMENT = 40;
	public static final int GE = 26;
	public static final int CONCAT = 17;
	public static final int LINE_COMMENT = 41;
	public static final int ELSE = 11;
	public static final int QUOT = 39;
	public static final int INT = 30;
	public static final int MINUS = 16;
	public static final int MUL = 18;
	public static final int NEQ = 28;
	public static final int WS = 42;
	public static final int NIL = 38;
	public static final int NEWLINE = 43;
	public static final int OR = 22;
	public static final int ASSIGN = 4;
	public static final int GT = 25;
	public static final int CALL = 14;
	public static final int DIV = 19;
	public static final int END = 9;
	public static final int LE = 24;
	public static final int STRING = 34;

	// delegates
	// delegators

	public LuaParser(TokenStream input) {
		this(input, new RecognizerSharedState());
	}

	public LuaParser(TokenStream input, RecognizerSharedState state) {
		super(input, state);

	}

	protected TreeAdaptor adaptor = new CommonTreeAdaptor();

	public void setTreeAdaptor(TreeAdaptor adaptor) {
		this.adaptor = adaptor;
	}

	public TreeAdaptor getTreeAdaptor() {
		return adaptor;
	}

	public String[] getTokenNames() {
		return LuaParser.tokenNames;
	}

	public String getGrammarFileName() {
		return "E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g";
	}

	public static class program_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "program"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:19:1: program : block ;
	public final LuaParser.program_return program() throws RecognitionException {
		LuaParser.program_return retval = new LuaParser.program_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		LuaParser.block_return block1 = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:20:2: ( block )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:20:4: block
			{
				root_0 = (Object) adaptor.nil();

				pushFollow(FOLLOW_block_in_program46);
				block1 = block();

				state._fsp--;

				adaptor.addChild(root_0, block1.getTree());

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "program"

	public static class block_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "block"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:23:1: block : ( stmt )* ( laststmt )? ;
	public final LuaParser.block_return block() throws RecognitionException {
		LuaParser.block_return retval = new LuaParser.block_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		LuaParser.stmt_return stmt2 = null;

		LuaParser.laststmt_return laststmt3 = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:24:2: ( ( stmt )* ( laststmt )? )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:24:4: ( stmt )* ( laststmt )?
			{
				root_0 = (Object) adaptor.nil();

				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:24:4: ( stmt )*
				loop1: do {
					int alt1 = 2;
					int LA1_0 = input.LA(1);

					if (((LA1_0 >= DEF && LA1_0 <= NAME) || LA1_0 == IF || LA1_0 == CALL)) {
						alt1 = 1;
					}

					switch (alt1) {
					case 1:
						// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:24:4: stmt
					{
						pushFollow(FOLLOW_stmt_in_block58);
						stmt2 = stmt();

						state._fsp--;

						adaptor.addChild(root_0, stmt2.getTree());

					}
						break;

					default:
						break loop1;
					}
				} while (true);

				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:24:10: ( laststmt )?
				int alt2 = 2;
				int LA2_0 = input.LA(1);

				if ((LA2_0 == RETURN)) {
					alt2 = 1;
				}
				switch (alt2) {
				case 1:
					// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:24:10: laststmt
				{
					pushFollow(FOLLOW_laststmt_in_block61);
					laststmt3 = laststmt();

					state._fsp--;

					adaptor.addChild(root_0, laststmt3.getTree());

				}
					break;

				}

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "block"

	public static class stmt_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "stmt"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:27:1: stmt : ( var ASSIGN exp | functioncall | DEF NAME LPAREN ( paramlist )? RPAREN block END | IF exp block ( elseblock )? END );
	public final LuaParser.stmt_return stmt() throws RecognitionException {
		LuaParser.stmt_return retval = new LuaParser.stmt_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token ASSIGN5 = null;
		Token DEF8 = null;
		Token NAME9 = null;
		Token LPAREN10 = null;
		Token RPAREN12 = null;
		Token END14 = null;
		Token IF15 = null;
		Token END19 = null;
		LuaParser.var_return var4 = null;

		LuaParser.exp_return exp6 = null;

		LuaParser.functioncall_return functioncall7 = null;

		LuaParser.paramlist_return paramlist11 = null;

		LuaParser.block_return block13 = null;

		LuaParser.exp_return exp16 = null;

		LuaParser.block_return block17 = null;

		LuaParser.elseblock_return elseblock18 = null;

		Object ASSIGN5_tree = null;
		Object DEF8_tree = null;
		Object NAME9_tree = null;
		Object LPAREN10_tree = null;
		Object RPAREN12_tree = null;
		Object END14_tree = null;
		Object IF15_tree = null;
		Object END19_tree = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:28:2: ( var ASSIGN exp | functioncall | DEF NAME LPAREN ( paramlist )? RPAREN block END | IF exp block ( elseblock )? END )
			int alt5 = 4;
			switch (input.LA(1)) {
			case NAME: {
				alt5 = 1;
			}
				break;
			case CALL: {
				alt5 = 2;
			}
				break;
			case DEF: {
				alt5 = 3;
			}
				break;
			case IF: {
				alt5 = 4;
			}
				break;
			default:
				NoViableAltException nvae = new NoViableAltException("", 5, 0,
						input);

				throw nvae;
			}

			switch (alt5) {
			case 1:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:28:4: var ASSIGN exp
			{
				root_0 = (Object) adaptor.nil();

				pushFollow(FOLLOW_var_in_stmt74);
				var4 = var();

				state._fsp--;

				adaptor.addChild(root_0, var4.getTree());
				ASSIGN5 = (Token) match(input, ASSIGN, FOLLOW_ASSIGN_in_stmt76);
				ASSIGN5_tree = (Object) adaptor.create(ASSIGN5);
				root_0 = (Object) adaptor.becomeRoot(ASSIGN5_tree, root_0);

				pushFollow(FOLLOW_exp_in_stmt79);
				exp6 = exp();

				state._fsp--;

				adaptor.addChild(root_0, exp6.getTree());

			}
				break;
			case 2:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:29:4: functioncall
			{
				root_0 = (Object) adaptor.nil();

				pushFollow(FOLLOW_functioncall_in_stmt85);
				functioncall7 = functioncall();

				state._fsp--;

				adaptor.addChild(root_0, functioncall7.getTree());

			}
				break;
			case 3:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:30:4: DEF NAME LPAREN ( paramlist )? RPAREN block END
			{
				root_0 = (Object) adaptor.nil();

				DEF8 = (Token) match(input, DEF, FOLLOW_DEF_in_stmt91);
				DEF8_tree = (Object) adaptor.create(DEF8);
				root_0 = (Object) adaptor.becomeRoot(DEF8_tree, root_0);

				NAME9 = (Token) match(input, NAME, FOLLOW_NAME_in_stmt94);
				NAME9_tree = (Object) adaptor.create(NAME9);
				adaptor.addChild(root_0, NAME9_tree);

				LPAREN10 = (Token) match(input, LPAREN, FOLLOW_LPAREN_in_stmt96);
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:30:22: ( paramlist )?
				int alt3 = 2;
				int LA3_0 = input.LA(1);

				if ((LA3_0 == NAME)) {
					alt3 = 1;
				}
				switch (alt3) {
				case 1:
					// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:30:23: paramlist
				{
					pushFollow(FOLLOW_paramlist_in_stmt100);
					paramlist11 = paramlist();

					state._fsp--;

					adaptor.addChild(root_0, paramlist11.getTree());

				}
					break;

				}

				RPAREN12 = (Token) match(input, RPAREN,
						FOLLOW_RPAREN_in_stmt104);
				pushFollow(FOLLOW_block_in_stmt107);
				block13 = block();

				state._fsp--;

				adaptor.addChild(root_0, block13.getTree());
				END14 = (Token) match(input, END, FOLLOW_END_in_stmt109);

			}
				break;
			case 4:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:31:4: IF exp block ( elseblock )? END
			{
				root_0 = (Object) adaptor.nil();

				IF15 = (Token) match(input, IF, FOLLOW_IF_in_stmt115);
				IF15_tree = (Object) adaptor.create(IF15);
				root_0 = (Object) adaptor.becomeRoot(IF15_tree, root_0);

				pushFollow(FOLLOW_exp_in_stmt118);
				exp16 = exp();

				state._fsp--;

				adaptor.addChild(root_0, exp16.getTree());
				pushFollow(FOLLOW_block_in_stmt120);
				block17 = block();

				state._fsp--;

				adaptor.addChild(root_0, block17.getTree());
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:31:18: ( elseblock )?
				int alt4 = 2;
				int LA4_0 = input.LA(1);

				if ((LA4_0 == ELSE)) {
					alt4 = 1;
				}
				switch (alt4) {
				case 1:
					// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:31:18: elseblock
				{
					pushFollow(FOLLOW_elseblock_in_stmt122);
					elseblock18 = elseblock();

					state._fsp--;

					adaptor.addChild(root_0, elseblock18.getTree());

				}
					break;

				}

				END19 = (Token) match(input, END, FOLLOW_END_in_stmt125);

			}
				break;

			}
			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "stmt"

	public static class elseblock_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "elseblock"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:34:1: elseblock : ELSE block ;
	public final LuaParser.elseblock_return elseblock()
			throws RecognitionException {
		LuaParser.elseblock_return retval = new LuaParser.elseblock_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token ELSE20 = null;
		LuaParser.block_return block21 = null;

		Object ELSE20_tree = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:35:2: ( ELSE block )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:35:4: ELSE block
			{
				root_0 = (Object) adaptor.nil();

				ELSE20 = (Token) match(input, ELSE, FOLLOW_ELSE_in_elseblock138);
				ELSE20_tree = (Object) adaptor.create(ELSE20);
				root_0 = (Object) adaptor.becomeRoot(ELSE20_tree, root_0);

				pushFollow(FOLLOW_block_in_elseblock141);
				block21 = block();

				state._fsp--;

				adaptor.addChild(root_0, block21.getTree());

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "elseblock"

	public static class laststmt_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "laststmt"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:39:1: laststmt : RETURN ( exp )? ;
	public final LuaParser.laststmt_return laststmt()
			throws RecognitionException {
		LuaParser.laststmt_return retval = new LuaParser.laststmt_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token RETURN22 = null;
		LuaParser.exp_return exp23 = null;

		Object RETURN22_tree = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:40:2: ( RETURN ( exp )? )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:40:4: RETURN ( exp )?
			{
				root_0 = (Object) adaptor.nil();

				RETURN22 = (Token) match(input, RETURN,
						FOLLOW_RETURN_in_laststmt154);
				RETURN22_tree = (Object) adaptor.create(RETURN22);
				root_0 = (Object) adaptor.becomeRoot(RETURN22_tree, root_0);

				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:40:12: ( exp )?
				int alt6 = 2;
				int LA6_0 = input.LA(1);

				if (((LA6_0 >= NAME && LA6_0 <= LPAREN) || LA6_0 == CALL
						|| LA6_0 == MINUS || (LA6_0 >= NOT && LA6_0 <= STRING))) {
					alt6 = 1;
				}
				switch (alt6) {
				case 1:
					// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:40:12: exp
				{
					pushFollow(FOLLOW_exp_in_laststmt157);
					exp23 = exp();

					state._fsp--;

					adaptor.addChild(root_0, exp23.getTree());

				}
					break;

				}

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "laststmt"

	public static class paramlist_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "paramlist"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:44:1: paramlist : NAME ( COMMA NAME )* ;
	public final LuaParser.paramlist_return paramlist()
			throws RecognitionException {
		LuaParser.paramlist_return retval = new LuaParser.paramlist_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token NAME24 = null;
		Token COMMA25 = null;
		Token NAME26 = null;

		Object NAME24_tree = null;
		Object COMMA25_tree = null;
		Object NAME26_tree = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:45:2: ( NAME ( COMMA NAME )* )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:45:4: NAME ( COMMA NAME )*
			{
				root_0 = (Object) adaptor.nil();

				NAME24 = (Token) match(input, NAME, FOLLOW_NAME_in_paramlist172);
				NAME24_tree = (Object) adaptor.create(NAME24);
				adaptor.addChild(root_0, NAME24_tree);

				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:45:9: ( COMMA NAME )*
				loop7: do {
					int alt7 = 2;
					int LA7_0 = input.LA(1);

					if ((LA7_0 == COMMA)) {
						alt7 = 1;
					}

					switch (alt7) {
					case 1:
						// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:45:10: COMMA NAME
					{
						COMMA25 = (Token) match(input, COMMA,
								FOLLOW_COMMA_in_paramlist175);
						NAME26 = (Token) match(input, NAME,
								FOLLOW_NAME_in_paramlist178);
						NAME26_tree = (Object) adaptor.create(NAME26);
						adaptor.addChild(root_0, NAME26_tree);

					}
						break;

					default:
						break loop7;
					}
				} while (true);

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "paramlist"

	public static class explist_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "explist"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:49:1: explist : exp ( COMMA exp )* ;
	public final LuaParser.explist_return explist() throws RecognitionException {
		LuaParser.explist_return retval = new LuaParser.explist_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token COMMA28 = null;
		LuaParser.exp_return exp27 = null;

		LuaParser.exp_return exp29 = null;

		Object COMMA28_tree = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:50:2: ( exp ( COMMA exp )* )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:50:4: exp ( COMMA exp )*
			{
				root_0 = (Object) adaptor.nil();

				pushFollow(FOLLOW_exp_in_explist192);
				exp27 = exp();

				state._fsp--;

				adaptor.addChild(root_0, exp27.getTree());
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:50:8: ( COMMA exp )*
				loop8: do {
					int alt8 = 2;
					int LA8_0 = input.LA(1);

					if ((LA8_0 == COMMA)) {
						alt8 = 1;
					}

					switch (alt8) {
					case 1:
						// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:50:9: COMMA exp
					{
						COMMA28 = (Token) match(input, COMMA,
								FOLLOW_COMMA_in_explist195);
						pushFollow(FOLLOW_exp_in_explist198);
						exp29 = exp();

						state._fsp--;

						adaptor.addChild(root_0, exp29.getTree());

					}
						break;

					default:
						break loop8;
					}
				} while (true);

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "explist"

	public static class exp_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "exp"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:53:1: exp : relexp ( logicop relexp )* ;
	public final LuaParser.exp_return exp() throws RecognitionException {
		LuaParser.exp_return retval = new LuaParser.exp_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		LuaParser.relexp_return relexp30 = null;

		LuaParser.logicop_return logicop31 = null;

		LuaParser.relexp_return relexp32 = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:54:2: ( relexp ( logicop relexp )* )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:54:4: relexp ( logicop relexp )*
			{
				root_0 = (Object) adaptor.nil();

				pushFollow(FOLLOW_relexp_in_exp211);
				relexp30 = relexp();

				state._fsp--;

				adaptor.addChild(root_0, relexp30.getTree());
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:54:11: ( logicop relexp )*
				loop9: do {
					int alt9 = 2;
					int LA9_0 = input.LA(1);

					if (((LA9_0 >= AND && LA9_0 <= OR))) {
						alt9 = 1;
					}

					switch (alt9) {
					case 1:
						// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:54:12: logicop relexp
					{
						pushFollow(FOLLOW_logicop_in_exp214);
						logicop31 = logicop();

						state._fsp--;

						root_0 = (Object) adaptor.becomeRoot(
								logicop31.getTree(), root_0);
						pushFollow(FOLLOW_relexp_in_exp217);
						relexp32 = relexp();

						state._fsp--;

						adaptor.addChild(root_0, relexp32.getTree());

					}
						break;

					default:
						break loop9;
					}
				} while (true);

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "exp"

	public static class relexp_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "relexp"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:57:1: relexp : plusexp ( relop plusexp )* ;
	public final LuaParser.relexp_return relexp() throws RecognitionException {
		LuaParser.relexp_return retval = new LuaParser.relexp_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		LuaParser.plusexp_return plusexp33 = null;

		LuaParser.relop_return relop34 = null;

		LuaParser.plusexp_return plusexp35 = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:58:2: ( plusexp ( relop plusexp )* )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:58:4: plusexp ( relop plusexp )*
			{
				root_0 = (Object) adaptor.nil();

				pushFollow(FOLLOW_plusexp_in_relexp230);
				plusexp33 = plusexp();

				state._fsp--;

				adaptor.addChild(root_0, plusexp33.getTree());
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:58:12: ( relop plusexp )*
				loop10: do {
					int alt10 = 2;
					int LA10_0 = input.LA(1);

					if (((LA10_0 >= LT && LA10_0 <= NEQ))) {
						alt10 = 1;
					}

					switch (alt10) {
					case 1:
						// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:58:13: relop plusexp
					{
						pushFollow(FOLLOW_relop_in_relexp233);
						relop34 = relop();

						state._fsp--;

						root_0 = (Object) adaptor.becomeRoot(relop34.getTree(),
								root_0);
						pushFollow(FOLLOW_plusexp_in_relexp236);
						plusexp35 = plusexp();

						state._fsp--;

						adaptor.addChild(root_0, plusexp35.getTree());

					}
						break;

					default:
						break loop10;
					}
				} while (true);

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "relexp"

	public static class plusexp_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "plusexp"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:61:1: plusexp : mulexp ( plusop mulexp )* ;
	public final LuaParser.plusexp_return plusexp() throws RecognitionException {
		LuaParser.plusexp_return retval = new LuaParser.plusexp_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		LuaParser.mulexp_return mulexp36 = null;

		LuaParser.plusop_return plusop37 = null;

		LuaParser.mulexp_return mulexp38 = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:62:2: ( mulexp ( plusop mulexp )* )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:62:4: mulexp ( plusop mulexp )*
			{
				root_0 = (Object) adaptor.nil();

				pushFollow(FOLLOW_mulexp_in_plusexp250);
				mulexp36 = mulexp();

				state._fsp--;

				adaptor.addChild(root_0, mulexp36.getTree());
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:62:11: ( plusop mulexp )*
				loop11: do {
					int alt11 = 2;
					int LA11_0 = input.LA(1);

					if (((LA11_0 >= PLUS && LA11_0 <= CONCAT))) {
						alt11 = 1;
					}

					switch (alt11) {
					case 1:
						// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:62:12: plusop mulexp
					{
						pushFollow(FOLLOW_plusop_in_plusexp253);
						plusop37 = plusop();

						state._fsp--;

						root_0 = (Object) adaptor.becomeRoot(
								plusop37.getTree(), root_0);
						pushFollow(FOLLOW_mulexp_in_plusexp256);
						mulexp38 = mulexp();

						state._fsp--;

						adaptor.addChild(root_0, mulexp38.getTree());

					}
						break;

					default:
						break loop11;
					}
				} while (true);

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "plusexp"

	public static class mulexp_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "mulexp"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:65:1: mulexp : atom ( mulop atom )* ;
	public final LuaParser.mulexp_return mulexp() throws RecognitionException {
		LuaParser.mulexp_return retval = new LuaParser.mulexp_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		LuaParser.atom_return atom39 = null;

		LuaParser.mulop_return mulop40 = null;

		LuaParser.atom_return atom41 = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:66:2: ( atom ( mulop atom )* )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:66:4: atom ( mulop atom )*
			{
				root_0 = (Object) adaptor.nil();

				pushFollow(FOLLOW_atom_in_mulexp269);
				atom39 = atom();

				state._fsp--;

				adaptor.addChild(root_0, atom39.getTree());
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:66:9: ( mulop atom )*
				loop12: do {
					int alt12 = 2;
					int LA12_0 = input.LA(1);

					if (((LA12_0 >= MUL && LA12_0 <= MOD))) {
						alt12 = 1;
					}

					switch (alt12) {
					case 1:
						// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:66:10: mulop atom
					{
						pushFollow(FOLLOW_mulop_in_mulexp272);
						mulop40 = mulop();

						state._fsp--;

						root_0 = (Object) adaptor.becomeRoot(mulop40.getTree(),
								root_0);
						pushFollow(FOLLOW_atom_in_mulexp275);
						atom41 = atom();

						state._fsp--;

						adaptor.addChild(root_0, atom41.getTree());

					}
						break;

					default:
						break loop12;
					}
				} while (true);

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "mulexp"

	public static class atom_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "atom"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:70:1: atom : ( number | string | var | functioncall | LPAREN exp RPAREN | unop exp );
	public final LuaParser.atom_return atom() throws RecognitionException {
		LuaParser.atom_return retval = new LuaParser.atom_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token LPAREN46 = null;
		Token RPAREN48 = null;
		LuaParser.number_return number42 = null;

		LuaParser.string_return string43 = null;

		LuaParser.var_return var44 = null;

		LuaParser.functioncall_return functioncall45 = null;

		LuaParser.exp_return exp47 = null;

		LuaParser.unop_return unop49 = null;

		LuaParser.exp_return exp50 = null;

		Object LPAREN46_tree = null;
		Object RPAREN48_tree = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:71:2: ( number | string | var | functioncall | LPAREN exp RPAREN | unop exp )
			int alt13 = 6;
			switch (input.LA(1)) {
			case INT:
			case FLOAT:
			case EXP:
			case HEX: {
				alt13 = 1;
			}
				break;
			case STRING: {
				alt13 = 2;
			}
				break;
			case NAME: {
				alt13 = 3;
			}
				break;
			case CALL: {
				alt13 = 4;
			}
				break;
			case LPAREN: {
				alt13 = 5;
			}
				break;
			case MINUS:
			case NOT: {
				alt13 = 6;
			}
				break;
			default:
				NoViableAltException nvae = new NoViableAltException("", 13, 0,
						input);

				throw nvae;
			}

			switch (alt13) {
			case 1:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:71:4: number
			{
				root_0 = (Object) adaptor.nil();

				pushFollow(FOLLOW_number_in_atom289);
				number42 = number();

				state._fsp--;

				adaptor.addChild(root_0, number42.getTree());

			}
				break;
			case 2:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:72:4: string
			{
				root_0 = (Object) adaptor.nil();

				pushFollow(FOLLOW_string_in_atom295);
				string43 = string();

				state._fsp--;

				adaptor.addChild(root_0, string43.getTree());

			}
				break;
			case 3:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:73:4: var
			{
				root_0 = (Object) adaptor.nil();

				pushFollow(FOLLOW_var_in_atom300);
				var44 = var();

				state._fsp--;

				adaptor.addChild(root_0, var44.getTree());

			}
				break;
			case 4:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:74:4: functioncall
			{
				root_0 = (Object) adaptor.nil();

				pushFollow(FOLLOW_functioncall_in_atom306);
				functioncall45 = functioncall();

				state._fsp--;

				adaptor.addChild(root_0, functioncall45.getTree());

			}
				break;
			case 5:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:75:4: LPAREN exp RPAREN
			{
				root_0 = (Object) adaptor.nil();

				LPAREN46 = (Token) match(input, LPAREN,
						FOLLOW_LPAREN_in_atom311);
				pushFollow(FOLLOW_exp_in_atom314);
				exp47 = exp();

				state._fsp--;

				adaptor.addChild(root_0, exp47.getTree());
				RPAREN48 = (Token) match(input, RPAREN,
						FOLLOW_RPAREN_in_atom316);

			}
				break;
			case 6:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:76:4: unop exp
			{
				root_0 = (Object) adaptor.nil();

				pushFollow(FOLLOW_unop_in_atom323);
				unop49 = unop();

				state._fsp--;

				root_0 = (Object) adaptor.becomeRoot(unop49.getTree(), root_0);
				pushFollow(FOLLOW_exp_in_atom326);
				exp50 = exp();

				state._fsp--;

				adaptor.addChild(root_0, exp50.getTree());

			}
				break;

			}
			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "atom"

	public static class var_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "var"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:80:1: var : NAME ;
	public final LuaParser.var_return var() throws RecognitionException {
		LuaParser.var_return retval = new LuaParser.var_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token NAME51 = null;

		Object NAME51_tree = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:81:2: ( NAME )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:81:4: NAME
			{
				root_0 = (Object) adaptor.nil();

				NAME51 = (Token) match(input, NAME, FOLLOW_NAME_in_var339);
				NAME51_tree = (Object) adaptor.create(NAME51);
				root_0 = (Object) adaptor.becomeRoot(NAME51_tree, root_0);

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "var"

	public static class functioncall_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "functioncall"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:85:1: functioncall : CALL NAME LPAREN args RPAREN ;
	public final LuaParser.functioncall_return functioncall()
			throws RecognitionException {
		LuaParser.functioncall_return retval = new LuaParser.functioncall_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token CALL52 = null;
		Token NAME53 = null;
		Token LPAREN54 = null;
		Token RPAREN56 = null;
		LuaParser.args_return args55 = null;

		Object CALL52_tree = null;
		Object NAME53_tree = null;
		Object LPAREN54_tree = null;
		Object RPAREN56_tree = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:86:2: ( CALL NAME LPAREN args RPAREN )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:86:4: CALL NAME LPAREN args RPAREN
			{
				root_0 = (Object) adaptor.nil();

				CALL52 = (Token) match(input, CALL,
						FOLLOW_CALL_in_functioncall352);
				CALL52_tree = (Object) adaptor.create(CALL52);
				root_0 = (Object) adaptor.becomeRoot(CALL52_tree, root_0);

				NAME53 = (Token) match(input, NAME,
						FOLLOW_NAME_in_functioncall355);
				NAME53_tree = (Object) adaptor.create(NAME53);
				adaptor.addChild(root_0, NAME53_tree);

				LPAREN54 = (Token) match(input, LPAREN,
						FOLLOW_LPAREN_in_functioncall357);
				pushFollow(FOLLOW_args_in_functioncall360);
				args55 = args();

				state._fsp--;

				adaptor.addChild(root_0, args55.getTree());
				RPAREN56 = (Token) match(input, RPAREN,
						FOLLOW_RPAREN_in_functioncall362);

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "functioncall"

	public static class args_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "args"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:90:1: args : ( explist )? ;
	public final LuaParser.args_return args() throws RecognitionException {
		LuaParser.args_return retval = new LuaParser.args_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		LuaParser.explist_return explist57 = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:91:2: ( ( explist )? )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:91:4: ( explist )?
			{
				root_0 = (Object) adaptor.nil();

				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:91:4: ( explist )?
				int alt14 = 2;
				int LA14_0 = input.LA(1);

				if (((LA14_0 >= NAME && LA14_0 <= LPAREN) || LA14_0 == CALL
						|| LA14_0 == MINUS || (LA14_0 >= NOT && LA14_0 <= STRING))) {
					alt14 = 1;
				}
				switch (alt14) {
				case 1:
					// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:91:4: explist
				{
					pushFollow(FOLLOW_explist_in_args375);
					explist57 = explist();

					state._fsp--;

					adaptor.addChild(root_0, explist57.getTree());

				}
					break;

				}

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "args"

	public static class plusop_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "plusop"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:95:1: plusop : ( PLUS | MINUS | CONCAT );
	public final LuaParser.plusop_return plusop() throws RecognitionException {
		LuaParser.plusop_return retval = new LuaParser.plusop_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token set58 = null;

		Object set58_tree = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:96:2: ( PLUS | MINUS | CONCAT )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:
			{
				root_0 = (Object) adaptor.nil();

				set58 = (Token) input.LT(1);
				if ((input.LA(1) >= PLUS && input.LA(1) <= CONCAT)) {
					input.consume();
					adaptor.addChild(root_0, (Object) adaptor.create(set58));
					state.errorRecovery = false;
				} else {
					MismatchedSetException mse = new MismatchedSetException(
							null, input);
					throw mse;
				}

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "plusop"

	public static class mulop_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "mulop"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:99:1: mulop : ( MUL | DIV | MOD );
	public final LuaParser.mulop_return mulop() throws RecognitionException {
		LuaParser.mulop_return retval = new LuaParser.mulop_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token set59 = null;

		Object set59_tree = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:100:2: ( MUL | DIV | MOD )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:
			{
				root_0 = (Object) adaptor.nil();

				set59 = (Token) input.LT(1);
				if ((input.LA(1) >= MUL && input.LA(1) <= MOD)) {
					input.consume();
					adaptor.addChild(root_0, (Object) adaptor.create(set59));
					state.errorRecovery = false;
				} else {
					MismatchedSetException mse = new MismatchedSetException(
							null, input);
					throw mse;
				}

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "mulop"

	public static class logicop_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "logicop"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:104:1: logicop : ( AND | OR );
	public final LuaParser.logicop_return logicop() throws RecognitionException {
		LuaParser.logicop_return retval = new LuaParser.logicop_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token set60 = null;

		Object set60_tree = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:105:2: ( AND | OR )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:
			{
				root_0 = (Object) adaptor.nil();

				set60 = (Token) input.LT(1);
				if ((input.LA(1) >= AND && input.LA(1) <= OR)) {
					input.consume();
					adaptor.addChild(root_0, (Object) adaptor.create(set60));
					state.errorRecovery = false;
				} else {
					MismatchedSetException mse = new MismatchedSetException(
							null, input);
					throw mse;
				}

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "logicop"

	public static class relop_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "relop"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:107:1: relop : ( LT | LE | GT | GE | EQ | NEQ );
	public final LuaParser.relop_return relop() throws RecognitionException {
		LuaParser.relop_return retval = new LuaParser.relop_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token set61 = null;

		Object set61_tree = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:108:2: ( LT | LE | GT | GE | EQ | NEQ )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:
			{
				root_0 = (Object) adaptor.nil();

				set61 = (Token) input.LT(1);
				if ((input.LA(1) >= LT && input.LA(1) <= NEQ)) {
					input.consume();
					adaptor.addChild(root_0, (Object) adaptor.create(set61));
					state.errorRecovery = false;
				} else {
					MismatchedSetException mse = new MismatchedSetException(
							null, input);
					throw mse;
				}

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "relop"

	public static class unop_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "unop"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:113:1: unop : ( MINUS | NOT );
	public final LuaParser.unop_return unop() throws RecognitionException {
		LuaParser.unop_return retval = new LuaParser.unop_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token MINUS62 = null;
		Token NOT63 = null;

		Object MINUS62_tree = null;
		Object NOT63_tree = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:114:2: ( MINUS | NOT )
			int alt15 = 2;
			int LA15_0 = input.LA(1);

			if ((LA15_0 == MINUS)) {
				alt15 = 1;
			} else if ((LA15_0 == NOT)) {
				alt15 = 2;
			} else {
				NoViableAltException nvae = new NoViableAltException("", 15, 0,
						input);

				throw nvae;
			}
			switch (alt15) {
			case 1:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:114:4: MINUS
			{
				root_0 = (Object) adaptor.nil();

				MINUS62 = (Token) match(input, MINUS, FOLLOW_MINUS_in_unop476);
				MINUS62_tree = (Object) adaptor.create(MINUS62);
				root_0 = (Object) adaptor.becomeRoot(MINUS62_tree, root_0);

			}
				break;
			case 2:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:115:4: NOT
			{
				root_0 = (Object) adaptor.nil();

				NOT63 = (Token) match(input, NOT, FOLLOW_NOT_in_unop482);
				NOT63_tree = (Object) adaptor.create(NOT63);
				root_0 = (Object) adaptor.becomeRoot(NOT63_tree, root_0);

			}
				break;

			}
			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "unop"

	public static class number_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "number"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:119:1: number : ( INT | FLOAT | EXP | HEX );
	public final LuaParser.number_return number() throws RecognitionException {
		LuaParser.number_return retval = new LuaParser.number_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token INT64 = null;
		Token FLOAT65 = null;
		Token EXP66 = null;
		Token HEX67 = null;

		Object INT64_tree = null;
		Object FLOAT65_tree = null;
		Object EXP66_tree = null;
		Object HEX67_tree = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:120:2: ( INT | FLOAT | EXP | HEX )
			int alt16 = 4;
			switch (input.LA(1)) {
			case INT: {
				alt16 = 1;
			}
				break;
			case FLOAT: {
				alt16 = 2;
			}
				break;
			case EXP: {
				alt16 = 3;
			}
				break;
			case HEX: {
				alt16 = 4;
			}
				break;
			default:
				NoViableAltException nvae = new NoViableAltException("", 16, 0,
						input);

				throw nvae;
			}

			switch (alt16) {
			case 1:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:120:4: INT
			{
				root_0 = (Object) adaptor.nil();

				INT64 = (Token) match(input, INT, FOLLOW_INT_in_number495);
				INT64_tree = (Object) adaptor.create(INT64);
				root_0 = (Object) adaptor.becomeRoot(INT64_tree, root_0);

			}
				break;
			case 2:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:121:4: FLOAT
			{
				root_0 = (Object) adaptor.nil();

				FLOAT65 = (Token) match(input, FLOAT, FOLLOW_FLOAT_in_number501);
				FLOAT65_tree = (Object) adaptor.create(FLOAT65);
				root_0 = (Object) adaptor.becomeRoot(FLOAT65_tree, root_0);

			}
				break;
			case 3:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:122:4: EXP
			{
				root_0 = (Object) adaptor.nil();

				EXP66 = (Token) match(input, EXP, FOLLOW_EXP_in_number508);
				EXP66_tree = (Object) adaptor.create(EXP66);
				root_0 = (Object) adaptor.becomeRoot(EXP66_tree, root_0);

			}
				break;
			case 4:
				// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:123:4: HEX
			{
				root_0 = (Object) adaptor.nil();

				HEX67 = (Token) match(input, HEX, FOLLOW_HEX_in_number515);
				HEX67_tree = (Object) adaptor.create(HEX67);
				root_0 = (Object) adaptor.becomeRoot(HEX67_tree, root_0);

			}
				break;

			}
			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "number"

	public static class string_return extends ParserRuleReturnScope {
		Object tree;

		public Object getTree() {
			return tree;
		}
	};

	// $ANTLR start "string"
	// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:126:1: string : STRING ;
	public final LuaParser.string_return string() throws RecognitionException {
		LuaParser.string_return retval = new LuaParser.string_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token STRING68 = null;

		Object STRING68_tree = null;

		try {
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:127:2: ( STRING )
			// E:/agh/tk/compiler-repo/eclipse/LuaCompiler/src/lua/compiler/grammar/Lua.g:127:4: STRING
			{
				root_0 = (Object) adaptor.nil();

				STRING68 = (Token) match(input, STRING,
						FOLLOW_STRING_in_string527);
				STRING68_tree = (Object) adaptor.create(STRING68);
				root_0 = (Object) adaptor.becomeRoot(STRING68_tree, root_0);

			}

			retval.stop = input.LT(-1);

			retval.tree = (Object) adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		} catch (RecognitionException re) {
			reportError(re);
			recover(input, re);
			retval.tree = (Object) adaptor.errorNode(input, retval.start,
					input.LT(-1), re);

		} finally {
		}
		return retval;
	}

	// $ANTLR end "string"

	// Delegated rules

	public static final BitSet FOLLOW_block_in_program46 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_stmt_in_block58 = new BitSet(
			new long[] { 0x0000000000005462L });
	public static final BitSet FOLLOW_laststmt_in_block61 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_var_in_stmt74 = new BitSet(
			new long[] { 0x0000000000000010L });
	public static final BitSet FOLLOW_ASSIGN_in_stmt76 = new BitSet(
			new long[] { 0x00000007E00140C0L });
	public static final BitSet FOLLOW_exp_in_stmt79 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_functioncall_in_stmt85 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_DEF_in_stmt91 = new BitSet(
			new long[] { 0x0000000000000040L });
	public static final BitSet FOLLOW_NAME_in_stmt94 = new BitSet(
			new long[] { 0x0000000000000080L });
	public static final BitSet FOLLOW_LPAREN_in_stmt96 = new BitSet(
			new long[] { 0x0000000000000140L });
	public static final BitSet FOLLOW_paramlist_in_stmt100 = new BitSet(
			new long[] { 0x0000000000000100L });
	public static final BitSet FOLLOW_RPAREN_in_stmt104 = new BitSet(
			new long[] { 0x0000000000005460L });
	public static final BitSet FOLLOW_block_in_stmt107 = new BitSet(
			new long[] { 0x0000000000000200L });
	public static final BitSet FOLLOW_END_in_stmt109 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_IF_in_stmt115 = new BitSet(
			new long[] { 0x00000007E00140C0L });
	public static final BitSet FOLLOW_exp_in_stmt118 = new BitSet(
			new long[] { 0x0000000000005460L });
	public static final BitSet FOLLOW_block_in_stmt120 = new BitSet(
			new long[] { 0x0000000000000A00L });
	public static final BitSet FOLLOW_elseblock_in_stmt122 = new BitSet(
			new long[] { 0x0000000000000200L });
	public static final BitSet FOLLOW_END_in_stmt125 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_ELSE_in_elseblock138 = new BitSet(
			new long[] { 0x0000000000005460L });
	public static final BitSet FOLLOW_block_in_elseblock141 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_RETURN_in_laststmt154 = new BitSet(
			new long[] { 0x00000007E00140C2L });
	public static final BitSet FOLLOW_exp_in_laststmt157 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_NAME_in_paramlist172 = new BitSet(
			new long[] { 0x0000000000002002L });
	public static final BitSet FOLLOW_COMMA_in_paramlist175 = new BitSet(
			new long[] { 0x0000000000000040L });
	public static final BitSet FOLLOW_NAME_in_paramlist178 = new BitSet(
			new long[] { 0x0000000000002002L });
	public static final BitSet FOLLOW_exp_in_explist192 = new BitSet(
			new long[] { 0x0000000000002002L });
	public static final BitSet FOLLOW_COMMA_in_explist195 = new BitSet(
			new long[] { 0x00000007E00140C0L });
	public static final BitSet FOLLOW_exp_in_explist198 = new BitSet(
			new long[] { 0x0000000000002002L });
	public static final BitSet FOLLOW_relexp_in_exp211 = new BitSet(
			new long[] { 0x0000000000600002L });
	public static final BitSet FOLLOW_logicop_in_exp214 = new BitSet(
			new long[] { 0x00000007E00140C0L });
	public static final BitSet FOLLOW_relexp_in_exp217 = new BitSet(
			new long[] { 0x0000000000600002L });
	public static final BitSet FOLLOW_plusexp_in_relexp230 = new BitSet(
			new long[] { 0x000000001F800002L });
	public static final BitSet FOLLOW_relop_in_relexp233 = new BitSet(
			new long[] { 0x00000007E00140C0L });
	public static final BitSet FOLLOW_plusexp_in_relexp236 = new BitSet(
			new long[] { 0x000000001F800002L });
	public static final BitSet FOLLOW_mulexp_in_plusexp250 = new BitSet(
			new long[] { 0x0000000000038002L });
	public static final BitSet FOLLOW_plusop_in_plusexp253 = new BitSet(
			new long[] { 0x00000007E00140C0L });
	public static final BitSet FOLLOW_mulexp_in_plusexp256 = new BitSet(
			new long[] { 0x0000000000038002L });
	public static final BitSet FOLLOW_atom_in_mulexp269 = new BitSet(
			new long[] { 0x00000000001C0002L });
	public static final BitSet FOLLOW_mulop_in_mulexp272 = new BitSet(
			new long[] { 0x00000007E00140C0L });
	public static final BitSet FOLLOW_atom_in_mulexp275 = new BitSet(
			new long[] { 0x00000000001C0002L });
	public static final BitSet FOLLOW_number_in_atom289 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_string_in_atom295 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_var_in_atom300 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_functioncall_in_atom306 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_LPAREN_in_atom311 = new BitSet(
			new long[] { 0x00000007E00140C0L });
	public static final BitSet FOLLOW_exp_in_atom314 = new BitSet(
			new long[] { 0x0000000000000100L });
	public static final BitSet FOLLOW_RPAREN_in_atom316 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_unop_in_atom323 = new BitSet(
			new long[] { 0x00000007E00140C0L });
	public static final BitSet FOLLOW_exp_in_atom326 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_NAME_in_var339 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_CALL_in_functioncall352 = new BitSet(
			new long[] { 0x0000000000000040L });
	public static final BitSet FOLLOW_NAME_in_functioncall355 = new BitSet(
			new long[] { 0x0000000000000080L });
	public static final BitSet FOLLOW_LPAREN_in_functioncall357 = new BitSet(
			new long[] { 0x00000007E00141C0L });
	public static final BitSet FOLLOW_args_in_functioncall360 = new BitSet(
			new long[] { 0x0000000000000100L });
	public static final BitSet FOLLOW_RPAREN_in_functioncall362 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_explist_in_args375 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_set_in_plusop0 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_set_in_mulop0 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_set_in_logicop0 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_set_in_relop0 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_MINUS_in_unop476 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_NOT_in_unop482 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_INT_in_number495 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_FLOAT_in_number501 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_EXP_in_number508 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_HEX_in_number515 = new BitSet(
			new long[] { 0x0000000000000002L });
	public static final BitSet FOLLOW_STRING_in_string527 = new BitSet(
			new long[] { 0x0000000000000002L });

}